<?php
class Macys_Form_MobileLogin extends Zend_Form {

	public function __construct($options = null)
	{
		parent::__construct($options);
		$this->setName('mobile_login');

			
		$username = new Zend_Form_Element_Text('username');
		$username->setLabel('User Name')
		->setRequired(true)
		->addValidator('NotEmpty');

		$password = new Zend_Form_Element_Password('password');
		$password->setLabel('Password')
		->setRequired(true)
		->addValidator('NotEmpty');
			
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Login');

		$this->addElements(array( $username,
		$password, $submit));

		/*
		 $this->clearDecorators();
		 $this->addDecorator('FormElements')
		 ->addDecorator('HtmlTag', array('tag' => '<ul>'))
		 ->addDecorator('Form');

		 $this->setElementDecorators(array(
		 array('ViewHelper'),
		 array('Errors'),
		 array('Description'),
		 array('Label', array('separator'=>' ')),
		 array('HtmlTag', array('tag' => 'li', 'class'=>'element-group')),
		 ));



		 // buttons do not need labels
		 $submit->setDecorators(array(
		 array('ViewHelper'),
		 array('Description'),
		 array('HtmlTag', array('tag' => 'li', 'class'=>'submit-group')),
		 ));
		 */

		// Table Decorator Starts
		$this->setDecorators(array(
    						'FormElements',
		array('HtmlTag', array('tag' => 'table')),
    						'Form'
    						));


    	$this->setElementDecorators(array(
    					'ViewHelper',
    						'Errors',
    						array(array('data' => 'HtmlTag'), array('tag' => 'td')),
    						array('Label', array('tag' => 'td')),
    						array(array('row' => 'HtmlTag'), array('tag' => 'tr'))
    						));

	}

}